package com.loongxun.xxapp.ui.pass;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.loongxun.xxapp.R;

/**
 * 忘记密码
 * Created by Administrator on 2017/10/24.
 */
public class PassChangeActivity extends Activity implements View.OnClickListener{

    private LinearLayout ll_phone_change,ll_pass_change;
    private TextView tv_pass_code,tv_seccess_hint;

    private TextView tv_title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pass_change);

        findViewById(R.id.iv_back).setOnClickListener(this);
        tv_title = (TextView) findViewById(R.id.tv_title);
        tv_title.setText("修改密码");

        //修改密码
        findViewById(R.id.tv_goto_change_pass).setOnClickListener(this);

        //修改密码成功
        tv_seccess_hint = (TextView) findViewById(R.id.tv_seccess_hint);
        tv_seccess_hint.setText("密码修改成功");
        findViewById(R.id.tv_goto_login).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        Intent intent;
        switch (view.getId()){
            case R.id.iv_back:
                finish();
                break;
            case R.id.tv_goto_pass:
                ll_phone_change.setVisibility(View.GONE);
                ll_pass_change.setVisibility(View.VISIBLE);
                break;
            case R.id.tv_goto_change_pass:
                findViewById(R.id.ll_results_ok).setVisibility(View.VISIBLE);
                break;
            case R.id.tv_goto_login:
                intent = new Intent();
                intent.putExtra("login", true);
                setResult(Activity.RESULT_OK, intent);
                finish();
                break;
            default:
                break;
        }
    }


}
